{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "tags": [
     "remove-cell"
    ]
   },
   "outputs": [],
   "source": [
    "# Reference: https://jupyterbook.org/interactive/hiding.html\n",
    "# Use {hide, remove}-{input, output, cell} tags to hiding content\n",
    "\n",
    "import sys\n",
    "import os\n",
    "if not any(path.endswith('textbook') for path in sys.path):\n",
    "    sys.path.append(os.path.abspath('../../..'))\n",
    "from textbook_utils import *"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "(ch:donkey)=\n",
    "# Case Study: How to Weigh a Donkey"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Donkeys play important roles in rural Kenya. People need them to transport crops, water, and people and to plow fields. \n",
    "When a donkey gets sick, the veterinarian needs to figure out how much the donkey \n",
    "weighs in order to prescribe the right amount of medicine.\n",
    "But many vets in rural Kenya don't have access to a scale, so they need to guess the donkey's weight.\n",
    "Too little medicine can allow an infection to reemerge; too much medicine can cause a harmful overdose.\n",
    "There are over 1.8 million donkeys in Kenya, so it's important to have \n",
    "a simple, accurate way to estimate the weight of a donkey."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this case study, we follow the work of [Kate Milner and Jonathan Rougier](https://doi.org/10.1111/j.1740-9713.2014.00768.x) to create a model that veterinarians in the Kenyan countryside can use to make accurate estimates of a donkey's weight.\n",
    "As usual, we walk through the steps of the data science lifecycle, but this time our work departs from the basics covered so far in this book. You can think of this case study as an opportunity to reflect on many of the core principles of working with data and to understand how they can be extended to address the context of the situation. We directly evaluate sources of measurement error, design a special loss function that reflects the concern about an overdose, build a model while keeping applicability utmost in mind, and evaluate model predictions using special criteria that are relative to the donkey's size.\n",
    "\n",
    "We begin with the scope of the data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
